<?php require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once($GLOBALS['PAD']."Modules/FJK46JDE/modconf.php");
MYTCONN();
	$memberID = 0;
	if (isset($_GET['trsf_Member'])) { $memberID = $_GET['trsf_Member']; }
	
	form_pr('staffdesmiss','','','post');
	echo '<div style="height:440px;">
	<div id="SelcMember" class="Line">';
	if ($memberID == 0) { 
		include($MODPAD.'Lib/sel_memberrsm.php');
	} else {
		include($MODPAD.'Lib/get_memberrsm.php');
	}
	echo '</div>';
	
	echo '<table>
	<tr><td>
	<b> Iniciativa</b>
	</td><td>';
	mn_field('hselect','ED','smb_DesmissType',1,'Trabalhador;Empregador#1;2','','','');
	echo '</td></tr>
	<tr><td>';
	echo 'Data da Demissao: </td><td>'; mn_field('date','ED','smb_DesmissDate','','staffdesmiss','8','False','');
	echo '</td></tr><tr><td>';
	echo 'Data de Saida da Empresa: </td><td>'; mn_field('date','ED','smb_DesmissDateOut','','staffdesmiss','8','False','');	 
	echo '</td></tr><tr><td>';	 
	echo 'Motivo: </td><td>'; mn_field('textarea','ED','smb_DesmissMotive','','70','15','False','');	 
	echo '</td></tr></table>
	</div>
	<div id="member_desmiss"></div>';

 mn_field('button','ED','Save','Guardar','','','','" style="width:100%;height:20" onClick="
  if (typeof(document.staffdesmiss.MemberID) == \'undefined\') {
		alert(\'Tem de escolher um funcionario.\');	
	} else {
	document.staffdesmiss.action=\''.$GLOBALS['URL'].'_response/rsproxy.php?pr=rh_memberdesmiss\';
	subform(\'staffdesmiss\',\'member_desmiss\');
	}');
?>
</form>